package com.zmm.study.mes.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmm.study.mes.entity.technology.SpFlowOperRelation;
import com.zmm.study.mes.vo.technology.SpOperVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description
 * name SpFlowOperRelationDao
 *
 * @author Zebulon
 * @date by 2022-05-05 21:48:17
 */
@Mapper
public interface SpFlowOperRelationDao extends BaseMapper<SpFlowOperRelation> {

    /**
     * 根据流程ID查询下挂的全部工序
     * @param flowId 流程关联ID
     * @return 工序关系集合
     */
    List<SpOperVo> queryOperRelationByFlowId(@Param("flowId") String flowId);

    /**
     * 删除流程下挂的全部工序
     * @param flowId 流程关联ID
     */
    void  deleteOperRelationByFlowId(@Param("flowId") String flowId);
}
